﻿@model List<GrandMan.GMDataSet.PartnerRow>
@{
    ViewBag.Title = "后台管理 -- 服务品牌";
    Layout = "Layout.cshtml"; 
}
<script type="text/javascript">
    function beforeDelete() {
        var str = "";
        $(".article").each(function () {
            if ($(this).attr("checked")) {
                if (str == "")
                    str += $(this).attr("id");
                else
                    str += "!" + $(this).attr("id");
            }
        });

        if (str != "")
            window.location.href = "/Admin/HomePartnerDelete?ids=" + str;
    }
</script>
<div class="content-box">
    <!-- Start Content Box -->
    <div class="content-box-header">
        <h3>服务品牌列表</h3>
    </div>
    <div class="content-box-content">
        <div class="bulk-actions align-left">
            <a class="button" href="/Admin/HomePartnerEdit">新增服务品牌</a> 
            <a class="button" onclick="beforeDelete()">删除服务品牌</a>
        </div>
        <table>
            <thead>
              <tr>
                <th><input class="check-all" type="checkbox" /></th>
                <th>名称</th>
                <th>顺序</th>
                <th>操作</th>
              </tr>
            </thead>
            <tfoot>
              @{foreach(var article in Model)
              {
              <tr>
                <td><input type="checkbox" id="@article.ID" class="article" /></td>
                <td>@article.Name</td>
                <td>@article.Seq</td>
                <td><a href="HomePartnerEdit?id=@article.ID" title="编辑"><img src="/Content/themes/images/icons/pencil.png" alt="Edit" /></a> <a href="HomePartnerDelete?ids=@article.ID" title="删除"><img src="/Content/themes/images/icons/cross.png" alt="Delete" /></a></td>
              </tr>        
              }
              }
            </tfoot>
        </table>
    </div>
</div>
